﻿<?php
/**
 * SQLParty 首页
 *
 * @package WordPress
 * @subpackage SQLParty
 * @since 2013-06-29
 */
get_header();
?>

    <div class="container">
        <div class="row">
          <div class="span3">
            <ul class="thumbnails">
              <li class="span3">
                <div class="thumbnail"> <img alt="SQL汇" src="/wp-content/themes/party/img/party.jpg" />
                    <div class="caption" >
                        <h3>SQL汇</h3>
                        <p class="pindent">            精细讲解SQL语言。基于简单博客系统的示例数据库，详细讲解MySQL、SQLServer、Oracle、DB2下使用的SQL的异同，以及各RDBMS下SQL方言的特色用法。</p>
                        <p class="pindent">
                        这里各RDBMS的测试版本：
                        <ul style="margin-left:60px;">
                        <li>MySQL 5.5</li>
                        <li>SQLServer 2008</li>
                        <li>Oracle 11g</li>
                        <li>DB2 9.5</li>
                        </ul>
                        </p>
                        <p><a class="btn btn-success" href="/sqlparty/">更多 &raquo;</a></p>
                    </div>
                </div>
              </li>
              <li  class="span3">
                <div class="thumbnail"> <img alt="每日一题" src="/wp-content/themes/party/img/daily.jpg">
                    <div class="caption" >
                        <h3>每日一题</h3>
                        <p class="pindent">每日精选典型SQL相关问答。</p>
                        <p class="pindent">积累与分享SQL使用技巧。</p>
                        <p><a class="btn btn-success" href="/daily/">更多 &raquo;</a></p>
                    </div>
                </div>
              </li>
              <li  class="span3">
                <div class="thumbnail"> <img alt="SQL周边" src="/wp-content/themes/party/img/im2.jpg">
                    <div class="caption" >
                        <h3>SQL周边</h3>
                        <p class="pindent">原创IT文章以及精选转载文章，以标签化的形式进行分类，大致包括：
                        <ol style="margin-left:60px;">
                            <li><strong>数据库</strong>——RDBMS的细节关注，如搭建，调优</li>
                            <li><strong>系统</strong>——操作系统、网络、运维等IT基础系统相关内容，如搭建、使用、配置等</li>
                            <li><strong>NOSQL</strong>——Not Only SQL，大数据时代，SQL的有力补充</li>
                            <li><strong>SQL解惑</strong>——SQL使用中的答疑解惑</li>
                            <li><strong>SQL酷文</strong>——SQL、数据库系统的深入研究文章</li>
                            <li><strong>其他</strong>——各类细化标签</li>
                        </ol>
                        </p>
                        <p><a class="btn btn-success" href="/morenav/">更多 &raquo;</a></p>
                    </div>
                </div>
              </li>
              <li  class="span3">
                <div class="thumbnail"> <img alt="关于" src="/wp-content/themes/party/img/im3.jpg">
                    <div class="caption" >
                        <h3>关于</h3>
                        <p class="pindent">本站以SQL知识的分享和传播为中心，延伸包括各RDBMS的SQL方言研究和分享，SQL周边包括系统、数据库、NOSQL等等各方面的优质IT文章。</p>
                        <p  class="pindent"><strong>让我们以数据之名，分享之义，齐聚SQLParty！</strong></p>
                        <p><a class="btn btn-success" href="/about/">更多 &raquo;</a></p>
                    </div>
                </div>
              </li>
            </ul>
          </div>
          <div class="span9">
            <div id="home_daily">
                <?php
                    global $more;
                    $more = 1;
                    $args = array(
                            'category_name'  => 'daily',
                            'posts_per_page'  => 1,
                            'offset'          => 0,
                            'orderby'         => 'post_date',
                            'order'           => 'DESC'
                            );
                    $query = new WP_Query( $args );

                    while ( $query->have_posts() ) 
                    {
                        $query->the_post();
                        echo "<div class='page-header'><h1>". get_the_title() . "  <small>每日一题</small></h1>";
                        echo "<span><i class='icon-calendar'></i>  ".get_the_date("Y年m月d日")."</span> | <i class='icon-tags'></i>  ";
                        the_tags(""," • ","");
                        echo "</div>";
                        the_content();
                ?>
                       <p><a href="/daily/" class="btn btn-primary btn-large">详细 &raquo;</a></p>
                <?php 
                    }
                    wp_reset_postdata();
                ?>
            </div>
            <hr>
            <hr>
            <div  id="home_newest">
                <div class="page-header">
                <h1>最新文章</h1>
                </div>
                <?php
                    global $more;
                    $more = 0;
                    $args = array(
                            'offset'          => 0,
                            'orderby'         => 'post_date',
                            'order'           => 'DESC',
                            'post_type'       => 'post',
                            'category__not_in' => array(4)
                            );
                    $query = new WP_Query( $args );

                    while ( $query->have_posts() ) 
                    {
                        $query->the_post();
                ?>
                        <div id="post-<?php the_ID(); ?>">
                            <h2><a href="<?php the_permalink() ?>" title="链接至 <?php the_title(); ?>"><?php the_title(); ?></a></h2>
                            <?php 
                                echo "<span><i class='icon-calendar'></i>  ".get_the_date("Y年m月d日")."</span>  <i class='icon-tags'></i>  "; 
                                the_tags(""," • ","");
                            ?>
                            <i class="icon-comment"></i> <?php comments_popup_link( '<span class="leave-reply">发表评论</span>', "1 条评论", "% 条评论"); ?>
                            <div class="entry-content">
                            <?php 
                                the_content("<span class='more'>...更多 ".get_the_title()."</span>"); 
                            ?>
                            </div>
                        </div>
                        <hr >
                <?php 
                    }
                    wp_reset_postdata();
                ?>
                <p><a href="/morenav/" class="btn btn-primary btn-large">更多 &raquo;</a></p>
            </div>
          </div>
        </div>

                
    </div> <!-- /container -->
      
<?php
get_footer();
?>
